home *** CD-ROM | disk | FTP | other *** search
/ Delphi Programmer's Power Pack / Delphi Volume 1.iso / s_to_z / t_rex10 / regexp.pas < prev    next >
Pascal/Delphi Source File  |  1996-09-15  |  754b  |  27 lines

  1. unit RegExp;
  2.  
  3. interface
  4.  
  5. type
  6.   HRegexp = word;       { handle to a regular expression search }
  7.  
  8.   TRegMatch = record    { search match record }
  9.     Start: Word;        { Start of match }
  10.     Stop:  Word;        { End of match }
  11.   end;
  12.  
  13. function RegComp(Pattern: PChar; var Error: integer): HRegexp;
  14. function RegExec(Regex: HRegexp; Str: PChar; var Match: TRegMatch): integer;
  15. function RegError(Regex: HRegexp; Error: integer; ErrorBuf: array of Char):
  16.     integer;
  17. procedure RegFree(Regex: HRegexp);
  18.  
  19. implementation
  20.  
  21. procedure RegFree;              external 'REGEXP';
  22. function RegError;              external 'REGEXP';
  23. function RegExec;               external 'REGEXP';
  24. function RegComp;               external 'REGEXP';
  25.  
  26. end.
  27.